from PyInstaller.utils.hooks import collect_all, collect_data_files

# 收集 torchvision 所有依赖
datas, binaries, hiddenimports = collect_all('torchvision')

# 额外添加可能缺失的依赖
hiddenimports += [
    'torchvision.models',
    'torchvision.transforms',
    'torchvision.io',
    'PIL',
    'PIL.Image',
    'PIL.ImageFile',
    'PIL.ImageOps',
]